<template>
	<div>
		{{date}}
	</div>
</template>

<script>
	export default {
	  name: 'test',
	  data: function() {
	    return {
	      date: new Date(),
				timer:''
	    };
	  },
	  created() {
	  },
	  mounted() {
	    this.timer = setInterval(()=>{
	      this.date = new Date().toLocaleString();
	    });
	  },
	  beforeDestroy: function() {
	    if (this.timer) {
	      clearInterval(this.timer);
	    }
	  },
	  methods: {
	   
	  }
	};
</script>

<style>
</style>
